#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.${artifactId}.${artifactId}object;

import org.springframework.${artifactId}.annotation.Id;
import org.springframework.${artifactId}.elasticsearch.annotations.Document;
import org.springframework.${artifactId}.elasticsearch.annotations.Field;
import org.springframework.${artifactId}.elasticsearch.annotations.FieldType;
import org.springframework.${artifactId}.elasticsearch.annotations.Setting;

import java.math.BigDecimal;

/**
 * @Author: shenyang
 * @CreateTime: 2023-09-18  13:32
 * @Description: TODO
 * @Version: 1.0
 */
@Document(indexName = "product")
//Shards 分片，Replicas 副本
@Setting(shards = 3, replicas = 0)
public class DemoProductDO {

    @Id
    private String id;


    @Field(analyzer = "ik_max_word", searchAnalyzer = "ik_smart", type = FieldType.Text)
    private String productName;


    @Field(analyzer = "ik_max_word", type = FieldType.Text)
    private String description;

    @Field(type = FieldType.Keyword)
    private String brandName;

    @Field(type = FieldType.Scaled_Float)
    private BigDecimal price;

    private String picUrl;

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getProductName() {
        return productName;
    }


    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getPicUrl() {
        return picUrl;
    }

    public void setPicUrl(String picUrl) {
        this.picUrl = picUrl;
    }
}
